Skip to content

Conversation

@whikloj
Copy link

@whikloj whikloj commented Oct 17, 2022

Context

When checking for errors in a curl_multi I pull the effective url to log with the error.

$url = curl_getinfo($curl_handles[$x], CURLINFO_EFFECTIVE_URL);

Which currently fails with php-vcr

BadMethodCallException: Not implemented: CURLINFO_EFFECTIVE_URL (1048577)

IMHO it really should just return the request url parameter from the source YAML.

What has been done

  • Added a nullable string parameter to the getCurlOptionFromResponse to pass in the URL (or null)
  • Get the url from the self::$requests array of VCR\Request objects

How to test

  • Before if you did a command like above you get the above error.
  • Now you should get the url provided in the request -> url parameter

Todo

  • [ ]
  • [ ]

Notes

@specialtactics
Copy link

Looks good, thanks for the PR.

@specialtactics specialtactics merged commit 5e56b0d into CoverGenius:master Nov 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants